#include<stdio.h>
#include<unistd.h>
//#include<sys/wait.h>


int main()
{
    int i,j,k;
    if(i=fork())//i>0,该进程是父进程
    {
      j=wait();
      printf("Parent Process!\n");
      printf("i=%d , j=%d , k=%d \n",i,j,k);
      printf("Parent Process PID=%d!\n",getpid());
    }
    else{
      k=getpid();
      printf("Child Process!\n");
      printf("i=%d , k=%d\n\n",i,k);
    }
}
